package com.lineage.config;

import com.lineage.server.utils.PerformanceTimer;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.util.Properties;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

public final class ConfigPrinceSkill {
  private static final Log _log = LogFactory.getLog(ConfigPrinceSkill.class);
  
  public static double STRIKER_DMG;
  
  private static final String CONFIG_FILE = "./config/王族_技能设定表.properties";
  
  public static void load() throws ConfigErrorException {
    PerformanceTimer timer = new PerformanceTimer();
    Properties set = new Properties();
    try {
      InputStream is = new FileInputStream(new File("./config/王族_技能设定表.properties"));
      set.load(is);
      is.close();
      STRIKER_DMG = Double.parseDouble(set.getProperty("STRIKER_DMG", "1.0"));
    } catch (Exception e) {
      throw new ConfigErrorException("设置档案遗失: ./config/王族_技能设定表.properties");
    } finally {
      set.clear();
      _log.info("Config/王族_技能设定表读取完成 (" + timer.get() + "ms)");
    } 
  }
}
